<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('招聘情况')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
</head>
<style>
    select {
        padding-top: 3px !important;
    }

    .select-list {
        margin-top: 5px !important;
    }

    .select-list li p {
        width: auto !important;
        margin-top: 7px !important;
    }

    .form-header {
        margin: 10px auto !important;

    }

    .table-striped .table > thead:first-child > tr:first-child > th {
        font-weight: normal;
        font-size: 13px;
        border: 1px solid #cccccc;
        border-right: none;
        border-top: 1px solid #cccccc !important;
    }
    .text {
        line-height: 34px;
        margin-bottom: 20px;
        white-space: nowrap;
    }

    .modal-body {
        padding: 15px !important;
    }
</style>
<body class="gray-bg">

<a class="btn btn-warning" data-toggle="modal" id="export" data-target="#myModal5">
    <i class="fa fa-download"></i> 导出模板
</a>

<div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span
                        aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                </button>
                <h4 class="modal-title">选择日期</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12">
                        <label class="col-sm-3 control-label text">年份：</label>
                        <div class="col-sm-8">
                            <select name="years" id="years" class="form-control noselect2">
                                <option value="">请选择</option>
                                <option value="2020">2020</option>
                                <option value="2021">2021</option>
                                <option value="2022">2022</option>
                                <option value="2023">2023</option>
                                <option value="2024">2024</option>
                                <option value="2025">2025</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12">
                        <label class="col-sm-3 control-label text">月份：</label>
                        <div class="col-sm-8">
                            <select name="months" id="months" class="form-control noselect2">
                                <option value="">请选择</option>
                                <option value="1">一月</option>
                                <option value="2">二月</option>
                                <option value="3">三月</option>
                                <option value="4">四月</option>
                                <option value="5">五月</option>
                                <option value="6">六月</option>
                                <option value="7">七月</option>
                                <option value="8">八月</option>
                                <option value="9">九月</option>
                                <option value="10">十月</option>
                                <option value="11">十一月</option>
                                <option value="12">十二月</option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" onclick="exportData()">导出</button>
                </div>
            </div>
        </div>
    </div>

</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<script th:inline="javascript">

    $(function () {
        $("#export").click();

    });

    function exportData() {
        var years = $("#years").val();
        var months = $("#months").val();
        if (years == '' || months == '') {
            alert("先选择导出日期");
        } else {
            $.operate.exportData("rlExportData/exportData?years= " + years + "&months=" + months, "人力资源数据");
            $(".btn-white").click();
        }
    }

</script>
</body>
</html>